package com.yixq.soa.service.comm.enums;

import java.util.HashMap;
import java.util.Map;

/**
 * 登录类型枚举 policapp.user login_type_id
 * @ClassName: LoginTypeIdEnum
 * @Description:
 * @author yixq yixq@doordu.com
 * @date 2017年5月16日 上午10:55:56
 * @version V1.0
 */
public enum LoginTypeIdEnum {
	
	PROPERTY_MANAGEMENT(0, "物管平台"),
	FLOATING_POPULATION(1, "流动人口"), 
	OPERATION_PLATFORM(2, "运营平台");

	private static Map<Integer, LoginTypeIdEnum> map = new HashMap<Integer, LoginTypeIdEnum>();
	static {
		for (LoginTypeIdEnum e : LoginTypeIdEnum.values()) {
			map.put(e.getTypeId(), e);
		}
	}

	private Integer typeId;
	private String name;

	private LoginTypeIdEnum(Integer typeId, String name) {
		this.typeId = typeId;
		this.name = name;
	}

	public static LoginTypeIdEnum getName(Integer typeId) {
		return map.get(typeId);
	}

	public Integer getTypeId() {
		return typeId;
	}

	public String toString() {
		return this.name;
	}

	public String getName() {
		return this.name;
	}
}
